-- GENERATED SPELL FOR [Stormpike Guardsman] --


function spell0_12127(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12127', 646, 1)
end

function spell1_12127(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12127', 544, 1)
end

function Sorts_12127(pUnit, Event)
local choix_sorts_12127 = math.random(0, 1)
if choix_sorts_12127 == 0 then
pUnit:RegisterEvent('spell0_12127', 1, 1)
end
if choix_sorts_12127 == 1 then
pUnit:RegisterEvent('spell1_12127', 1, 1)
end
end

function mob12127_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12127', math.random(1500, 3000), 1)
end

function mob12127_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12127_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12127_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12127, 1, 'mob12127_Action')
RegisterUnitEvent(12127, 2, 'mob12127_Leave')
RegisterUnitEvent(12127, 3, 'mob12127_Kill')
RegisterUnitEvent(12127, 4, 'mob12127_Die')
